#include<bits/stdc++.h>
using namespace std;
int people[520][520] ,n;
int main(void){
    cin >> n;
    for(int i = 1; i<=n; i++){
        for(int j = i+1; j<=n; j++){
            cin >> people[i][j];
            people[j][i] = people[i][j];
        }
    }
    int max = 0;
    for(int i = 1; i<=n; i++){
        sort(people[i] +1 ,people[i]+n+1);
        max = max > people[i][n-1] ? max : people[i][n-1];
    }
    printf("1\n%d",max);
    return 0;
}